<?php
/** @var OportunidadController $this */
/** @var Oportunidad $model */
/** @var AweActiveForm $form */
// Prevenir que jquery se cargue dos veces
Yii::app()->clientScript->scriptMap['jquery.js'] = false;
Util::tsRegisterAssetJs('_form_modal.js');
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
    'id' => 'listas-votos-form',
    'type' => 'horizontal',
    'enableAjaxValidation' => true,
    'clientOptions' => array('validateOnSubmit' => false, 'validateOnChange' => false,),
    'enableClientValidation' => false,
        ));
?>
<script> var limite = <?php echo $limite ?></script>
<div class="modal-header">
    <a class="close" data-dismiss="modal">&times;</a>
    <h4><i class="icon-tag"></i> Agregar Listas Votos </h4>
</div>
<div class="modal-body">

    <?php
    $model_cuenta = Lista::model()->searchListasActivas("ACTIVO", $limite);
    $models = new Lista;
    if (!empty($model_cuenta)) {
        echo $form->select2Row($model, 'id_lista', array(
            'asDropDownList' => true,
            'data' => CHtml::listData($model_cuenta, 'id', 'nombre'),
            'empty' => array(0 => '- Ninguna -'),
            'class' => 'span10',
            'options' => array(
                'placeholder' => 'type clever, or is, or just type!',
            )
        ));
    }
    ?>

    <?php echo $form->textFieldRow($model, 'cantidad_votos') ?>
<!--hiddenField-->
    <?php echo $form->hiddenField($model, 'id_hont') ?>
    <?php
    ?>


</div>


<div class="modal-footer">
<?php
$this->widget('bootstrap.widgets.TbButton', array(
    'type' => 'success',
    'icon' => 'ok',
    'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
    'htmlOptions' => array(
        'onClick' => 'js:actualizarCampanias("#listas-votos-form")')
));
?>
    <?php
    $this->widget('bootstrap.widgets.TbButton', array(
        'icon' => 'remove',
        'label' => Yii::t('AweCrud.app', 'Cancel'),
        'htmlOptions' => array(
            'data-dismiss' => 'modal',)
    ));
    ?>
</div>

<?php $this->endWidget(); ?>
